﻿using SD.Infrastructure.RepositoryBase;
using SlamDunk.MES.Domain.Entities.FoundationContext;
using SlamDunk.ValueObjects.Enums;
using System;
using System.Collections.Generic;

namespace SlamDunk.MES.Domain.IRepositories.Interfaces.FoundationContext
{
    /// <summary>
    /// 工厂模型仓储接口
    /// </summary>
    public interface IFacilityRepository : IAggRootRepository<Facility>
    {
        #region # 完整获取工厂模型 —— Facility SingleFully(Guid facilityId)
        /// <summary>
        /// 完整获取工厂模型
        /// </summary>
        /// <param name="facilityId">工厂模型Id</param>
        /// <returns>工厂模型</returns>
        Facility SingleFully(Guid facilityId);
        #endregion

        #region # 深度获取工厂模型列表 —— ICollection<Facility> FindDeeply(string keywords...
        /// <summary>
        /// 深度获取工厂模型列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="facilityLevel">工厂模型层次</param>
        /// <param name="facilityType">工厂模型类型</param>
        /// <param name="parentNodeId">上级节点Id</param>
        /// <returns>工厂模型列表</returns>
        ICollection<Facility> FindDeeply(string keywords, FacilityLevel? facilityLevel, FacilityType? facilityType, Guid? parentNodeId);
        #endregion

        #region # 获取根级工厂模型列表 —— ICollection<Facility> FindRoots()
        /// <summary>
        /// 获取根级工厂模型列表
        /// </summary>
        /// <returns>工厂模型列表</returns>
        ICollection<Facility> FindRoots();
        #endregion
    }
}
